
<div style="height:600px; position: relative ">

<div class="mb20">
    <a role="button" ng-click="batchSave('onSale')"   class="btn btn-primary">上架</a>
    <a role="button" ng-click="batchSave('offSale')"  class="btn btn-primary">下架</a>
    <a role="button" ng-click="batchSave('discount')" class="btn btn-primary">会员折扣</a>
    <a role="button" ng-click="batchSave('deleted')"  class="btn btn-danger">删除</a>
    <a role="button"  href="/download/report.xlsx"  class="btn btn-primary">导入模板下载</a>
    <file-upload class="dib" accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"on-success="importData(url)"  url="/upload/importExcel" title="导入数据"></file-upload>

    <div class="dib">
        <select class="form-control" ng-model="search.state" ng-change="setState(search.state)" >
            <option value="">全部</option>
            <option value="0">上架</option>
            <option value="1">下架</option>
            <option value="2">售罄</option>
        </select>
    </div>

    <div class="dib">
        <input type="text" ng-model="search.name" class="form-control dib mdw" >
        <a role="button" ng-click="searchName(search.name)"  class="btn btn-primary">搜索</a>
    </div>

</div>
<table class="table table-striped table-condensed table-bordered table-hover">
    <thead>
    <tr style="background-color: #0081c2; color: #FFFFFF">
        <td><input type="checkbox" ng-model="allChecked" ng-change="checkAll(allChecked)" ></td>
        <td>序号 <span class="dib r">
                <span class="glyphicon  glyphicon-chevron-up db cp"  ng-click="sort('seq', 'ascending')" aria-hidden="true"></span>
                    <span class="glyphicon glyphicon-chevron-down db cp" ng-click="sort('seq', 'descending')" aria-hidden="true">
                         </span></span></td>

        <td ng-repeat="attr in showAttrs" ng-bind="attr.zhCn"></td>
        <td>状态 <span class="dib r">
                <span class="glyphicon  glyphicon-chevron-up db cp"  ng-click="sort('state', 'ascending')" aria-hidden="true"></span>
                    <span class="glyphicon glyphicon-chevron-down db cp" ng-click="sort('state', 'descending')" aria-hidden="true">
                         </span></span></td>

        <td>创建时间 <span class="dib r">
                <span class="glyphicon  glyphicon-chevron-up db cp"  ng-click="sort('createdAt', 'ascending')" aria-hidden="true"></span>
                    <span class="glyphicon glyphicon-chevron-down db cp" ng-click="sort('createdAt', 'descending')" aria-hidden="true">
                         </span></span></td>
        <td >操作</td>
    </tr>
    </thead>
    <tbody>
    <tr ng-repeat="model in models">
        <td><input type="checkbox" ng-model="model.checked" ></td>
        <td>{{model.seq}}</td>
        <td ng-repeat="attr in showAttrs" ng-bind="model[attr.en]" >
        </td>
        <td>{{model.state == 0 ? "上架":"下架"}}</td>
        <td>{{model.createdAt | date:'yyyy-MM-dd '}}</td>
        <td><a class="btn btn-default"  role="button" href="#/edit-production/{{model.objectId}}">编辑</a>
            <a class="btn btn-danger"  ng-click="remove(model)" role="button" >删除</a>
        </td>
    </tr>
    </tbody>

</table>



<h4  ng-if="models.length==0">暂无数据</h4>


<div style="position: absolute; bottom: 0px" paging
     page= search.pageNo
     page-size= search.pageSize
     total= total
     paging-action = "paging(page)">
</div>
</div>


